/**
 * @file geminai_selfcheck.h
 * @brief 自检
 * @author zl
 */

#ifndef __GEMINAI_SELFCHECK__
#define __GEMINAI_SELFCHECK__

#include "geminai_gpio.h"
#include "geminai_uart.h"
#include "geminai_hlw8032.h"
#include "geminai_para.h"
#include "geminai_led_pwm.h"
#include "geminai_adc.h"
#include "esp_wifi.h"
#include <stdint.h>
#include <stdio.h>
#include "cJSON.h"
#include "geminai_mqtt_cache.h"
#include "esp_log.h"
#include "geminai_log.h"
#include "geminai_audio.h"

typedef struct {
	int8_t		ntc0;	//柜内温度传感器
	int8_t		ntcTA;	//环境温度传感器
	int8_t		powerMeter;	//功率计
	int8_t		comprs;		 // 压缩机
	int8_t		fan;		   // 风机
	int8_t      light;  // 灯
	int8_t      battery;   // 电池
	int8_t      wifi;   // wifi
	int8_t      bt;   // 蓝牙
	int8_t      lte;   // 4g
	int8_t		adapter;	//电源适配器
	int8_t		displayCamera;	//陈列摄像头
	int8_t		saleCamera;	//动销摄像头
	int8_t		gyro;	//陀螺仪
} check_flags;	//自检

void selfcheck_task(void *paramer);
void setup_selfcheck_lte_flag(void);
void send_selfcheck_result(void);
void setdown_selfcheck_lte_flag(void);

extern check_flags check_result;

#endif
